package com.enroll.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.enroll.dao.StudentDao;
import com.enroll.model.Student;
import com.enroll.sevice.StudentService;

@Service("studentService")
public class StudentServiceImpl implements StudentService {

	@Autowired
	StudentDao studentDao;
	
	
	public void setStudentDao(StudentDao studentDao) {
		this.studentDao = studentDao;
	}


	@Override
	public void save(Student student) {
		studentDao.save(student);

	}


	@Override
	public void delete(Student student) {
		studentDao.delete(student);
		
	}


	@Override
	public void update(Student student) {
		studentDao.update(student);
		
	}


	@Override
	public Student findById(int id) {
		return studentDao.findById(id);
	}


	@Override
	public List<Student> findAll() {
		return studentDao.findAll();
	}

}
